﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kokomo.Lexical.Expressions;

namespace Kokomo.PeInspector.Reflection.Query
{
	class SelectManyClause : DependentClause
	{
		public Expression EnumerableExpression { get; private set; }
		public TypedVariable RangeVariable { get; private set; }

		public SelectManyClause(
			QueryClause source,
			Expression enumerableExpression,
			TypedVariable rangeVariable
			)
			: base(source)
		{
			if (enumerableExpression == null) throw new ArgumentNullException("enumerableExpression");
			if (rangeVariable == null) throw new ArgumentNullException("rangeVariable");

			this.EnumerableExpression = enumerableExpression;
			this.RangeVariable = rangeVariable;
		}
	}
}
